Skip to content

Conversation

sgued
Copy link
Contributor

@sgued sgued commented Oct 8, 2025

This patch documents the issue reported in #583 and adds failing loom tests to exercise #583 hoping that a future algorithm change can make them pass.

The tests are ran in CI but their results is ignored for now as they fail.

Ideally the loom tests will cover more usage of mpmc::Queue in the future and also cover spsc.

This patch documents rust-embedded#583 adds failing loom tests to exercise rust-embedded#583
hoping that a future algorithm change can make them pass.

The tests are ran in CI but their results is ignored for now as they fail.

Ideally the `loom` tests will cover more usage of `mpmc::Queue` in the future
and also cover `spsc`.

#[cfg(not(any(feature = "portable-atomic", loom)))]
use core::sync::atomic;
#[cfg(feature = "portable-atomic")]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#[cfg(feature = "portable-atomic")]
#[cfg(all(feature = "portable-atomic", not(loom)))]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it ever makes sense to have loom and portable-atomic running.
Maybe we can add a compile_error! that prevents any use of --cfg loom outside of the expected feature combination.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whichever you prefer, I just added the change here since you added the conditional compilation above for core::sync::atomic. Without the conditional compilation selector, or the compile_error it's possible to combine both (though it result in a different error about a name conflict).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants